package com.h2.gwt.util.lang;

public final class StringUtils {
   
   private StringUtils() {
      //utility constructor
   }

   public static <T> String collectionToString(Iterable<T> iterable,
         String delimiter) {
      StringBuilder builder = new StringBuilder();
      for (T item : iterable) {
         builder.append(item);
         builder.append(delimiter);
      }
      if(builder.length() > 0) {
         builder.delete(builder.length() - delimiter.length(),
               builder.length());
      }
      return builder.toString();
   }
}
